<template>
  <div class="pay">
    <header>
      <div class="img">
        <img :src="indo.img1" alt />
      </div>
      <div class="name"></div>
    </header>
    <main>
      <div class="main">
        <div class="main_int">
          <div></div>
        </div>
        <div class="main_pay">
          <h3>用户点评</h3>
          <div class="rewiew_one">
            <div class="rewiew" v-for="(item,index) in list" :key="index">
              <span>{{index}}:{{item}}</span>
            </div>
          </div>
          <div class="input_send">
            <input type="text" v-model="value" class="input" />
            <span @click="send()" class="send">发送</span>
          </div>
        </div>
      </div>
    </main>
  </div>
</template>

<script>
import axios from "../utils/request";
export default {
  data() {
    return {
      indo: [],
      value: "",
      list: []
    };
  },
  created() {
    this.id = this.$route.params.id;
    this.getList();
  },
  methods: {
    getList() {
      axios({
        url: "/api/details",
        method: "post",
        data: {
          id: this.id
        }
      }).then(res => {
        this.indo = res.data.data;
      });
    },
    send() {
      this.list.push(this.value);
      this.value = "";
    }
  }
};
</script>

<style scoped>
.pay {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
header {
  width: 100%;
  height: 200px;
  border-bottom: 1px solid #ccc;
  background-image: url("https://wx1.sinaimg.cn/mw690/001ZhrVily1gubu3x9d6uj60zk0zkgvg02.jpg");
  background-repeat: no-repeat;
}
main {
  flex: 1;
  overflow-y: auto;
}
header .img {
  width: 100%;
  height: 110px;
  /* border: 1px solid #000; */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}
header .img img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}
.name {
  width: 100%;
  height: 30px;
  /* border: 1px solid #000; */
  text-align: center;
}
.name span {
  font-weight: bold;
  color: #515253;
  font-size: 20px;
}
.main_int .main_img {
  width: 50px;
  height: 50px;
}
.main_int {
  display: flex;
  border-bottom: 1px solid #cccccc;
  margin-left: 10px;
}
.main_int div {
  margin-left: 10px;
}
.main_int div img {
  width: 300px;
  height: 200px;
}
.rewiew_one {
  width: 100%;
  height: 200px;
  border: 1px solid rgb(201, 241, 216);
}
.input_send {
  width: 100%;
  height: 70px;
  /* border: 1px solid #000; */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 20px;
}
h3 {
  font-size: 25px;
  font-weight: bold;
  margin-left: 10px;
}
.input {
  width: 300px;
  height: 40px;
  border: 1px solid #eec9ff;
}
.send {
  width: 60px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  border: 1px solid rgb(243, 169, 206);
  display: inline-block;
  color: #c9e2ff;
}
</style>